<%--                                                                       --%>
<%-- Copyright (c) 2001-2004 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries.                       --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/bv-html.tld" prefix="bvhtml" %>

<%@ page import="java.util.HashMap" %>
<%@ page import="org.apache.commons.beanutils.PropertyUtils" %>

<jsp:useBean id="micrositeHomeView" scope="request" type="com.broadvision.web.util.ViewDynaBean"/>
<jsp:useBean id="micrositeNaviInfoView" scope="request" type="com.broadvision.web.util.ViewDynaBean"/>

<% 
  java.util.HashMap map = (HashMap)PropertyUtils.getProperty(
                                                    micrositeNaviInfoView,
                                                    "urlParams");
  map.put("currentAction", "home");
%>

<script language=JavaScript>

function onClickSwitchPhase(theForm) {
  theForm.displayPhaseId.value = theForm.elements['urlParams.displayPhaseId'].value;
  theForm.submit();
}

function submitForm(theForm, currentActionValue, url) {
  theForm.currentAction.value = currentActionValue;
  theForm.action = url;
  theForm.submit();
}

function doload() {
  if (self.opener !=null && self.opener != "" && self.opener.name != undefined) {
    self.opener.refreshOpener();
  }
}

</script>

<body onload="doload()">

<!-- Zone 5 starts here.  -->
		  
      <table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="10" summary="content area">
	    <tr>
		  <td colspan="2" valign="top">
		  
		    <div class="pageTitle">
				    <!--start microsite logo and name here-->
              <%@ include file="/cs/microsite/micrositeNaviInfo.jsp" %>
            <!--end microsite logo and name here-->
		    </div>

        <!--  BEGIN form { switch phase } --------------------------->			
		    <div align="right">
				  <logic:equal name="micrositeNaviInfoView" property="micrositeTemplatePhaseFlag" value="true">
					  <html:form method="post" action="/cs/micrositeHome.do">
						<bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request" />
						<html:select name="micrositeNaviInfoView" property="urlParams.displayPhaseId" size="1">
							<bean:define id="allPhasesList" name="micrositeHomeView" property="allPhasesList" />
							<html:optionsCollection name="micrositeHomeView" property="allPhasesList" />
						</html:select>&nbsp;
						<input type="button" class="globalButton"
									 onclick="onClickSwitchPhase(this.form)"
									 value="<bean:message key='button.go'/>"
									 titleKey="button.go">
					</html:form>
				 </logic:equal>
       </div>
			 <!--  END form { switch phase } ------------------------------->
		  </td>
		</tr>
   <!-- Start input properties block -->
    <logic:equal name="disputeHomeView" property="displayDisputeBlock" value="true">
    <tr>
      <td colspan="2">
        <div class="pageInstructions"><b><bean:message key="cs.collaboration.disputeId"/>:
              <bean:write name="disputeHomeView" property="disputeId"/></b></div>
        <div class="pageSubtitle">
            <span class="left"><bean:message key="cs.collaboration.accountInformation"/></span>
            <span class="right">&nbsp;</span>
        </div> 
        <!--end page title area here-->
        <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="Previous charges">
          <tr>
            <td class="label" width="20%"><bean:message key="cs.collaboration.accountId"/>:</td>
            <td class="labelField" width="80%"><bean:write name="disputeHomeView" property="accountId"/></td>
          </tr>
          <tr> 
            <td class="label" width="20%"><bean:message key="cs.collaboration.name"/>:</td>
            <td class="labelField" width="80%"><bean:write name="disputeHomeView" property="name"/></td>
          </tr>
          <tr> 
            <td class="label" width="20%"><bean:message key="cs.collaboration.address"/>:</td>
            <td class="labelField" width="80%"><bean:write name="disputeHomeView" property="address"/></td>
          </tr>
          <tr> 
            <td class="label" width="20%"><bean:message key="cs.collaboration.phone"/>:</td>
            <td class="labelField" width="80%"><bean:write name="disputeHomeView" property="customerPhone"/></td>
          </tr>
        </table>
        <div class="pageSubtitle">
          <span class="left"><bean:message key="cs.collaboration.currentCharges"/></span>
          <span class="right">&nbsp;</span>
        </div> 
        <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="Previous charges">
          <tr> 
            <td class="label" width="30%"><bean:message key="cs.collaboration.amount"/>:</td>
            <td class="labelField" width="10%" nowrap align="right"><bean:message key="cs.collaboration.currency"/>  <bean:write name="disputeHomeView" property="subAmount"/></td>
            <td class="labelField" width="60%">&nbsp;</td>
          </tr>
          <tr> 
            <td class="label" width="30%"><bean:message key="cs.collaboration.taxes"/>:</td>
            <td class="labelField" width="10%" nowrap align="right"><bean:message key="cs.collaboration.currency"/>  <bean:write name="disputeHomeView" property="taxAmount"/></td>
            <td class="labelField" width="60%">&nbsp;</td>
          </tr>
          <tr> 
            <td class="label" width="30%"><bean:message key="cs.collaboration.surcharges"/>:</td>
            <td class="labelField" width="10%" nowrap align="right"><bean:message key="cs.collaboration.currency"/>  <bean:write name="disputeHomeView" property="surchargeAmount"/></td>
            <td class="labelField" width="60%">&nbsp;</td>
          </tr>
          <tr> 
            <td class="label" width="30%"><bean:message key="cs.collaboration.totalAmountDue"/>:</td>
            <td class="labelField" width="10%" nowrap align="right"><bean:message key="cs.collaboration.currency"/>  <bean:write name="disputeHomeView" property="totalAmount"/></td>
            <td class="labelField" width="60%">&nbsp;</td>
          </tr>
          <tr> 
            <td class="label" width="30%"><bean:message key="cs.collaboration.dueDate"/>:</td>
            <td class="labelField" width="10%" nowrap align="right">
              <bean:write name="disputeHomeView" property="dueDate" formatKey="format.date.medium"/>
            </td>
            <td class="labelField" width="60%">&nbsp;</td>
          </tr>
          <tr>
            <td class="label" width="30%"><bean:message key="cs.collaboration.disputeReason"/>:</td>
            <td class="labelField" colspan="2">
            <bean:write name="disputeHomeView" property="disputeReason"/>
            </td>
          </tr>
          <tr>
            <td class="label" width="30%"><bean:message key="cs.collaboration.disputeResolution"/>:</td>
            <td class="labelField" colspan="2"> 
            <bean:write name="disputeHomeView" property="disputeResolution"/>
            </td>
          </tr>

        </table>
      </td>
      </tr>
     </logic:equal>
<!-- End input properties block -->
		
		<tr>
		  <td valign="top" width="50%" align="center">
		    
			<!-- To Do block -->
			<div class="blockTitle">
			  <span class="left">
              <html:link page="/cs/taskList.do?currentAction=todos" name="micrositeNaviInfoView" property="urlParams"> 
                <bean:message key="cs.todos"/>
              </html:link>
			  </span>
                <logic:notEqual name="micrositeHomeView" property="isMsReadOnly" value="true">
				<span class="right">
				<html:form action="/cs/taskNew.do" method="post" >
				<bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request" />

                  <input type="button" class="titleButton" name="taskNewBtn"
                     value='<bean:message key="button.createNew"/>'
                     titleKey="button.createNew"
                     onclick="submitForm(this.form, 'todos','<html:rewrite page="/cs/taskNew.do"/>')">
				</html:form>
				</span>
                </logic:notEqual>

			</div> 
		    <table width="100%" class="blockTable" border="0" cellspacing="1" cellpadding="2" summary="My Tasks Table">
	            <tr class="listHeader"> 
		        <th id="MyTasks" align="left"><bean:message key="cs.tasks.my"/></th>
		        <th id="DueDate" align="left"><bean:message key="cs.tasks.dueDate"/></th>
			    </tr>
                <logic:iterate id="task" property="tasks" name="micrositeHomeView" indexId="index">
                  <tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>'>
                  <td headers="MyTasks">
				    <html:link page="/cs/taskView.do" name="task" property="urlParams">
					<html:img page="/cs/images/buttons/global/gbtn_tasks.gif" width="22" height="18" 
						                   altKey="cs.image.alt.task" border="0" align="absmiddle"/>
				    <bean:write name="task" property="name"/>
                    </html:link>
				  </td>
                 <td headers="DueDate"><bean:write name="task" property="dueDate"/></td>
                 </tr>
               </logic:iterate>
		      <logic:equal name="micrositeHomeView" property="tasks.empty" value="true">
		        <tr class="listOdd">
		          <td align="center" colspan="5">
		            <bean:message key="cs.collaboration.noTasks"/>
		          </td>
		        </tr>
		      </logic:equal>
			</table>
			<!-- End To-do's block -->
			
			<!-- Announcements block --> 
		    <div class="blockTitle">
			  <span class="left">
              <html:link page="/cs/announcementList.do?currentAction=announcements" name="micrositeNaviInfoView" property="urlParams"> 
                <bean:message key="cs.announcements"/>
              </html:link>
			  </span>
              <logic:notEqual name="micrositeHomeView" property="isMsReadOnly" value="true">
				<span class="right">
				<html:form action="/cs/announcementNew.do" method="post" >
				<bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request" />
				<input type="button" class="titleButton" name="announcementNewBtn"
                                  value='<bean:message key="button.createNew"/>'
                                  titleKey="button.createNew"
			          onclick="submitForm(this.form, 'announcements','<html:rewrite page="/cs/announcementNew.do"/>')">
				</html:form>
				</span>
              </logic:notEqual>
			</div> 
		    <table width="100%" class="blockTable" border="0" cellspacing="1" cellpadding="2" summary="Announcements table">
		     <tr class="listHeader"> 
		        <th id="Name" align="left"><bean:message key="cs.name"/></th>
			 </tr>
		     <logic:iterate id="announcement" property="announcements" name="micrositeHomeView" indexId="index">
               <tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>' valign="top">
               <td align="left" valign="top">
			     <html:link page="/cs/announcementView.do" name="announcement" property="urlParams">
				 <html:img page="/cs/images/buttons/global/gbtn_announcement.gif" width="22" height="18" 
						                altKey="cs.image.alt.announcement" border="0" align="absmiddle"/>
				   <bean:write name="announcement" property="name"/>
                 </html:link>&nbsp;:&nbsp;<bean:write name="announcement" property="description"/>
			   </td>
               </tr>
             </logic:iterate>
		      <logic:equal name="micrositeHomeView" property="announcements.empty" value="true">
		        <tr class="listOdd">
		          <td align="center" colspan="5">
		            <bean:message key="cs.collaboration.noAnnouncements"/>
		          </td>
		        </tr>
		      </logic:equal>
			</table>
			
			<!-- End Announcements block --> 
	        
			<!-- Documents block --> 
			<logic:equal name="micrositeHomeView" property="accessDocuments" value="true">
		    <div class="blockTitle">
			  <span class="left">
              <html:link page="/cs/documentIndex.do?currentAction=documents" name="micrositeNaviInfoView" property="urlParams"> 
                <bean:message key="cs.documents"/>
              </html:link>
			  </span>
              <logic:notEqual name="micrositeHomeView" property="isPhaseReadOnly" value="true">
			  <span class="right">
				<logic:equal name="micrositeHomeView" property="publisher" value="true">
				<html:form action="/cs/documentNew.do" method="post" >
				  <input type="button" class="titleButton" name="documentNewBtn"
                                         value='<bean:message key="button.createNew"/>'
                                         titleKey="button.createNew"
                                         onclick="submitForm(this.form, 'documents', '<html:rewrite page="/cs/documentNew.do"/>')">
                  <logic:iterate id="oneParam" name="micrositeHomeView" property="folderUrlParams" indexId="index">
                   <input type="hidden" name="<bean:write name="oneParam" property="key" />" 
							       value="<bean:write name="oneParam" property="value" />">
                  </logic:iterate>
				</html:form>
				</logic:equal>									
			  </span>
              </logic:notEqual>
			</div> 
		    <table width="100%" class="blockTable" border="0" cellspacing="1" cellpadding="2" summary="Documents table">
		     <tr class="listHeader"> 
		        <th id="Name" align="left"><bean:message key="cs.name"/></th>
			 </tr>
            <logic:iterate id="folder" property="folders" name="micrositeHomeView" indexId="index">
            <tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>'>
              <td align="left" valign="top">
							<html:link page="/cs/documentIndex.do?currentAction=documents" name="folder" property="urlParams">
              <html:img page="/cs/images/buttons/global/gbtn_folder.gif" width="22" height="18" align="absmiddle" altKey="cs.folder" border="0"/>
              <bean:write name="folder" property="name"/>
              </html:link>
			  </td>
            </tr>
          </logic:iterate>
	      <logic:equal name="micrositeHomeView" property="folders.empty" value="true">
	        <tr class="listOdd">
	          <td align="center" colspan="5">
	            <bean:message key="cs.collaboration.noFolders"/>
	          </td>
	        </tr>
	      </logic:equal>
          <logic:iterate id="document" property="documents" name="micrositeHomeView" indexId="index">
            <tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>'>
              <td align="left" valign="top">
							<html:link page="/cs/documentView.do" name="document" property="urlParams">
							<html:img page="/cs/images/buttons/global/gbtn_document.gif" width="22" height="18" align="absmiddle" altKey="cs.document" border="0"/>
							<bean:write name="document" property="name"/>
              </html:link>, <bean:write name="document" property="ownerName"/>
			  </td>
            </tr>
          </logic:iterate>
			</table>
			</logic:equal>
			<!-- End Documents block --> 
			
		  </td>
		  <td valign="top" width="50%" align="center">
			
			<!-- Meetings block -->
			<div class="blockTitle">
			    <span class="left">
                  <html:link page="/cs/meetingList.do?currentAction=meetings" name="micrositeNaviInfoView" property="urlParams"> 
                    <bean:message key="cs.meetings"/>
                  </html:link>
                </span>
              <logic:notEqual name="micrositeHomeView" property="isMsReadOnly" value="true">
				<span class="right">
				<html:form action="/cs/meetingNew.do" method="post" >
				<bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request" />
				<input type="button" class="titleButton" name="meetingNewBtn"
                                       value='<bean:message key="button.createNew"/>'
                                       titleKey="button.createNew"
			               onclick="submitForm(this.form, 'meetings','<html:rewrite page="/cs/meetingNew.do"/>')">
                </html:form>
				</span>
              </logic:notEqual>
			</div> 
		    <table width="100%" class="blockTable" border="0" cellspacing="1" cellpadding="2" summary="Meetings Table">
	          <tr class="listHeader">
		        <th id="DateAndTime" align="left"><bean:message key="cs.date.and.time"/></th>
		        <th id="Name" align="left"><bean:message key="cs.name"/></th>
			  </tr>
                <logic:iterate id="meeting" property="meetings" name="micrositeHomeView" indexId="index">
                  <tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>'>
                  <td headers="DateAndTime">
                    <bean:write name="meeting" property="startDate" formatKey="format.date.full"/><br>
                    <bean:write name="meeting" property="startDate" formatKey="format.time.short"/> -  
                    <bean:write name="meeting" property="endDate" formatKey="format.time.short"/>&nbsp;
				  </td>
                 <td headers="Name">
				   <html:link page="/cs/meetingView.do" name="meeting" property="urlParams">
                   <bean:write name="meeting" property="name"/>
                   </html:link> <br>
                   <bean:write name="meeting" property="location"/>
                 </td>
                 </tr>
               </logic:iterate>
		      <logic:equal name="micrositeHomeView" property="meetings.empty" value="true">
		        <tr class="listOdd">
		          <td align="center" colspan="5">
		            <bean:message key="cs.collaboration.noMeetings"/>
		          </td>
		        </tr>
		      </logic:equal>
			</table>
			<!-- End Meetings block -->
			
			<!-- Checklists block --> 
		    <div class="blockTitle">
			  <span class="left">
                <html:link page="/cs/checklistList.do?currentAction=checklists" name="micrositeNaviInfoView" property="urlParams"> 
			      <bean:message key="cs.checklists"/>
			    </html:link>
			  </span>
              <logic:notEqual name="micrositeHomeView" property="isPhaseReadOnly" value="true">
			  <span class="right">
				<html:form action="/cs/checklistNew.do" method="post" >
				<bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request" />
				<input type="submit" class="titleButton" name="checklistNewBtn"
                                       value='<bean:message key="button.createNew"/>'
                                       titleKey="button.createNew"
			               onclick="submitForm(this.form, 'checklists','<html:rewrite page="/cs/checklistNew.do"/>')">

                </html:form>
			  </span>
              </logic:notEqual>
			</div> 
		    <table width="100%" class="blockTable" border="0" cellspacing="1" cellpadding="2" summary="Checklists table">
		     <tr class="listHeader"> 
		        <th id="Name" align="left"><bean:message key="cs.name"/></th>
			 </tr>
		     <logic:iterate id="checklist" property="checklists" name="micrositeHomeView" indexId="index">
               <tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>' valign="top">
               <td align="left" valign="top">
			     <html:link page="/cs/checklistTaskList.do" name="checklist" property="urlParams">
				 <html:img page="/cs/images/buttons/global/gbtn_checklist.gif" width="22" height="18" 
						                altKey="cs.image.alt.announcement" border="0" align="absmiddle"/>
				   <bean:write name="checklist" property="name"/>
                 </html:link>
			   </td>
               </tr>
             </logic:iterate>
		      <logic:equal name="micrositeHomeView" property="checklists.empty" value="true">
		        <tr class="listOdd">
		          <td align="center" colspan="5">
		            <bean:message key="cs.collaboration.noChecklists"/>
		          </td>
		        </tr>
		      </logic:equal>
			</table>
			
			<!-- End Checklists block -->  
			
			<!-- Discussion Group block --> 
		    <div class="blockTitle">
			  <span class="left">
                <html:link page="/cs/discussionList.do?currentAction=discussions" name="micrositeNaviInfoView" property="urlParams"> 
			      <bean:message key="cs.discussion.groups"/>
			    </html:link>
			  </span>
              <logic:notEqual name="micrositeHomeView" property="isMsReadOnly" value="true">
			  <span class="right">
				<logic:equal name="micrositeHomeView" property="owner" value="true">
				<html:form action="/cs/discussionEdit.do" method="post" >
                                   <bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request" />
				   <input type="button" class="titleButton" name="discussionEditBtn"
                                      value='<bean:message key="button.createNew"/>'
                                      titleKey="button.createNew"
                                      onclick="submitForm(this.form, 'discussions', '<html:rewrite page="/cs/discussionEdit.do"/>')">
				</html:form>
				</logic:equal>
				</span>
                </logic:notEqual>
			</div> 
		    <table width="100%" class="blockTable" border="0" cellspacing="1" cellpadding="2" summary="Discussion Group table">
		     <tr class="listHeader"> 
		        <th id="Name" align="left"><bean:message key="cs.name"/></th>
			 </tr>
				<logic:iterate id="oneDiscussion" property="discussions" name="micrositeHomeView" indexId="index">
                  <tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>'>
                     <td align="left" valign="top">
						<html:link page="/cs/discussionView.do" name="oneDiscussion" property="urlParams">
						<html:img page="/cs/images/buttons/global/gbtn_discussion.gif" width="22" height="18" altKey="cs.image.alt.discussion.group" border="0" align="absmiddle"/>
						<bean:write name="oneDiscussion" property="name"/>
						</html:link>
					  </td>
                  </tr>
                </logic:iterate>
		      <logic:equal name="micrositeHomeView" property="discussions.empty" value="true">
		        <tr class="listOdd">
		          <td align="center" colspan="5">
		            <bean:message key="cs.collaboration.noDiscussions"/>
		          </td>
		        </tr>
		      </logic:equal>
        </table>
			<!-- End Discussion Group block --> 

     
	      </td>
	     </tr> 
    </table>
	  <!--end zone 5 content here -->

